package executor;

/**
 * @author tongchen
 * @create 2023-01-20 18:53
 */
public class TestMyThreadPool {
    public static void main(String[] args) throws InterruptedException {
        MyThreadPool myThreadPool = new MyThreadPool(3);
        for (int i = 0; i < 100; i++) {
            int taskId=i;
            myThreadPool.submit(()->{
                System.out.println("线程"+Thread.currentThread().getName()+",当前任务"+taskId);
            });
        }

    }
}
